﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using Sharp.DataTransferObject;
using Sharp.Infrastructure;
using Sharp.Infrastructure.Interfaces;
using Sharp.Infrastructure.Search;

namespace Sharp.ServiceContracts
{
    public partial interface IUserService
    {
 
        /// <summary>
        /// 发送消息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(FaultData))]
        Result SendMessage(MessageDTO model);
        /// <summary>
        /// 消息存为草稿
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(FaultData))]
        Result DraftMessage(MessageDTO model);
        /// <summary>
        /// 删除消息
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(FaultData))]
        Result DeleteMessages(Guid[] ids);

        /// <summary>
        /// 获取消息
        /// </summary>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(FaultData))]
        MessageDTO GetMessageInfo(Guid id);

        /// <summary>
        /// 获取消息分页数据
        /// </summary>
        /// <param name="pf"></param>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(FaultData))]
        PagedResult<MessageDTO> GetMessagePaged(PagingFeature pf);
        /// <summary>
        /// 发件箱
        /// </summary>
        /// <param name="pf"></param>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(FaultData))]
        PagedResult<MessageDTO> GetMessageOutboxPaged(PagingFeature pf);
        /// <summary>
        /// 草稿箱
        /// </summary>
        /// <param name="pf"></param>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(FaultData))]
        PagedResult<MessageDTO> GetMessageDraftboxPaged(PagingFeature pf);
        /// <summary>
        /// 垃圾箱
        /// </summary>
        /// <param name="pf"></param>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(FaultData))]
        PagedResult<MessageDTO> GetMessageDustbinPaged(PagingFeature pf);
        /// <summary>
        /// 未读消息
        /// </summary>
        /// <returns></returns>
        [OperationContract, FaultContract(typeof(FaultData))]
        Result<IList<MessageDTO>>  NoReadMessages();
    }
}